package com.ydd.service;

import com.ydd.dto.*;
import com.ydd.entity.YddUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ydd.result.Result;
import com.ydd.vo.YddUserInfoVO;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.security.auth.login.AccountNotFoundException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author itcast
 * @since 2023-05-15
 */
public interface IYddUserService extends IService<YddUser> {


    /**
     * 根据id查询用户详情
     * @param id
     * @return
     */
    public Result userDetail(String id);


    /**
     * 查询所有用户
     * @return
     */
    public Result searchUser(PageDTO pageDTO);


    /**
     * 添加用户
     * @return
     */
    public Result addUser(AddUserDTO addUserDTO);

    /**
     * 根据id删除用户
     * @return
     */
    public Result deleteUserById(String id);


    /**
     * 修改用户
     * @param updateUserDTO
     * @return
     */
    public Result updateUser(UpdateUserDTO updateUserDTO);
    /**
     * 员工登录
     * @param
     * @return
     */
    YddUser login(UserLoginDTO userLoginDTO) throws AccountNotFoundException;

    /**
     * 获取用户信息
     *
     * @return
     */
    YddUserInfoVO getUserInfo();
}
